From 5ed66abe17f3f16ff1323695daea15785c2701d4 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Thu, 30 Mar 2006 00:07:23 +0100 Subject: [PATCH] Xen waits 5 seconds to reboot when domain 0 crashes, giving time to read crash messages. From: Chris Wright Signed-off-by: Keir Fraser --- xen/common/domain.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xen/common/domain.c b/xen/common/domain.c index e98b4994d3..b582719545 100644 --- a/xen/common/domain.c +++ b/xen/common/domain.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -222,6 +223,13 @@ void domain_shutdown(struct domain *d, u8 reason) printk("Domain 0 halted: halting machine.\n"); machine_halt(); } + else if ( reason == SHUTDOWN_crash ) + { + printk("Domain 0 crashed: rebooting machine in 5 seconds.\n"); + watchdog_disable(); + mdelay(5000); + machine_restart(0); + } else { printk("Domain 0 shutdown: rebooting machine.\n"); -- 2.30.2